﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SMBL.Interface.AbstractServer
{
    /// <summary>
    /// The interface of an Abstract System.
    /// </summary>
    public interface IAS : LifeCycle.IStart, LifeCycle.IRestart, LifeCycle.IEnd
    {
        /// <summary>
        /// Get a provider from the AS.
        /// </summary>
        /// <param name="BindString">The string should be binded with provider.</param>
        /// <returns>A provider.</returns>
        IAProvider GetProvider(String BindString);

        /// <summary>
        /// Release the used provider.
        /// </summary>
        /// <param name="BindString">The string binded with the provider</param>
        /// <param name="theProvider">The provider to be released.</param>
        /// <returns>The release statue.</returns>
        Boolean ReleaseProvider(String BindString, ref IAProvider theProvider);

        /// <summary>
        /// Has current AS been started.
        /// </summary>
        Boolean IsStarted { get; }

        /// <summary>
        /// Is the AS available to be used.
        /// </summary>
        Boolean IsAvailable { get; }
    }
}
